package org.cuit.echo.seon.combat.logsystem;

import org.cuit.echo.seon.combat.logsystem.factory.DatabaseLoggerFactory;
import org.cuit.echo.seon.combat.logsystem.factory.FileLoggerFactory;
import org.cuit.echo.seon.combat.logsystem.factory.LoggerFactory;
import org.cuit.echo.seon.combat.logsystem.impl.Logger;

/**
 * @author Seon
 * @version 1.0
 * @since 2024-09-04
 */
public class Main {
    public static void main(String[] args) {
        // 可以通过方法来选择工厂
        LoggerFactory loggerFactory = new DatabaseLoggerFactory();
//        LoggerFactory loggerFactory = new FileLoggerFactory();

        Logger logger = loggerFactory.createLogger();
        logger.log("This is a log message");
    }
}
